﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>无标题页</title>
    <script type="text/javascript">
    var arr = [12,2,3,5,7];
    for(var i in arr)
    {
        if(i != 0)
        {
            document.write("|");
        }
        document.write(arr[i]);
    }
    document.write("<br/>");
    //字典风格
    var dic = {"tom":30,"kate":20};
    for(var i in dic)
    {
        if(i != "tom")
        {
            document.write("|");
        }
        document.write(dic[i]);
    }
    </script>
</head>
<body>

</body>
</html>
